﻿#pragma once
#include "Strategy/CStrategyDefine.h"

enum _eWorldTimePass;
class CStrategyLogicMapMsgHandle;;

class CStrategyLogicWorld
{
public:
	static CStrategyLogicWorld& Singleton() { static CStrategyLogicWorld g_World; return g_World; }		// 单例
	~CStrategyLogicWorld() = default;
private:
	CStrategyLogicWorld() = default;
	CStrategyLogicWorld(const CStrategyLogicWorld&) = delete;
	CStrategyLogicWorld& operator =(const CStrategyLogicWorld&) = delete;

	void DayChange();
	
public:
	bool HandleMessages(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
	void SetWorldTimePassLv(_eWorldTimePass n) { m_nTimePassLevel = n; }
	bool GetSleepTime(WORD* wSleepTime);	// false 表示 时间暂停
private:
	_eWorldTimePass m_nTimePassLevel = TimePass_1;	// 时间流逝等级 0代表暂停
	_stDate m_tWorldDate = _stDate(867, 1, 1);		// 世界当前日期
	// 遍历所有人的事件map
	// 



private:
	CStrategyLogicMapMsgHandle* m_pMapMsgHandle;

public:
	static void CreateStrategyLogicLoop();		// 多线程
};